package com.smedi.ismedi.authoritymanagement.core.infrastructure.enumerate;

/**
 * @Author: xulinjun
 * @Date: 2021-6-7 16:18
 */
public enum ScopeAttributeEnum {
    COMPANY_MEMBER("HR_ORGANIZATION", "企业组织"),

    PROJECT_MEMBER("PROJECT", "项目");

    private String name;

    private String value;

    ScopeAttributeEnum(String value, String name) {
        this.name = name;
        this.value = value;
    }

    public static String getName(String value) {
        for (ScopeAttributeEnum c : ScopeAttributeEnum.values()) {
            if (c.getValue().equals(value)) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
